import { request } from '@/utils/request';

const Api = {
  list: '/dept/list',
  secondDepts: '/dept/secondDept',
  users: '/dept/user',
  save: '/dept/save',
  del: '/dept/del'
};

export function getList() {
  return request.get({
    url: Api.list
  });
}


export function getSecondDepts() {
  return request.get({
    url: Api.secondDepts
  });
}



export function getUsers() {
  return request.get({
    url: Api.users
  });
}

export function saveDept(params) {
  return request.post({
    url: Api.save,
    params
  });
}

export function del(id) {
  return request.delete({
    url: Api.del + "/" + id
  });
}
